package com.kai.steering.data.service.util;

import java.util.ArrayList;
import java.util.List;

public  class EqualsUtil {
   static public boolean objectEquals(Object value,Object compare){
        if (value==null&&compare==null){
            return true;
        }

        if (value==null&&compare!=null){
            return false;
        }
        return value.equals(compare);

    }
    static public boolean objectEquals(Object value, Object... compareList){
        for (Object o : compareList) {
            if (objectEquals(value,o)) {
                return true;
            }
        }
        return false;
   }
    static public boolean objectEquals(Object value, List<Object> compareList){
        for (Object o : compareList) {
            if (objectEquals(value,o)) {
                return true;
            }
        }
        return false;
    }

    static public boolean objectBooleanEquals(Boolean b){
       if (b==null){
           return false;
       }else {
           return b;
       }
    }

}
